import request from '@/utils/request1';

export const get = (data: {
    gradeLevel: null | number;
    pageIndex: number;
    pageSize: number;
}) => {
    return request({
        url: '/api/admin/task/page',
        method: 'post',
        data: data
    });
}

export const search = (id: number) => {
    return request({
        url: "/api/admin/task/select/" + id,
        method: 'post'
    })
}

export const subject = () => {
    return request({
        url: "/api/admin/education/subject/list",
        method: 'post'
    })
}

export const getpaper = (data: any) => {
    return request({
        url: '/api/admin/exam/paper/taskExamPage',
        method: 'post',
        data: data
    });
}

export const add = (data: any) => {
    return request({
        url: "/api/admin/task/edit",
        method: 'post',
        data: data
    })
}

export const del = (id: any) => {
    return request({
        url: "/api/admin/task/delete/" + id,
        method: 'post'
    })
}